package com.leigang.java.code.design.mode.templateMethod;

import com.leigang.java.code.design.mode.templateMethod.impl.Coffee;
import com.leigang.java.code.design.mode.templateMethod.impl.Tea;

/**
 * @author leigang
 * @version 1.0
 * @date 2022/5/4 23:28
 **/
public class BeverageTestDrive {
    public static void main(String[] args) {
        com.leigang.java.code.design.mode.templateMethod.impl.Coffee coffee = new Coffee();
        com.leigang.java.code.design.mode.templateMethod.impl.Tea tea = new Tea();

        System.out.println("making tea");
        coffee.prepareRecipe();
        System.out.println("making coffee");
        tea.prepareRecipe();


        //jdk中用到模板方法
        //Arrays.sort();
        //ArrayList
    }
}
